package com.fs.service.Impl;

import com.fs.mapper.DistrictsMapper;
import com.fs.mapper.HtypesMapper;
import com.fs.mapper.StreetsMapper;
import com.fs.pojo.Districts;
import com.fs.pojo.Htypes;
import com.fs.pojo.Streets;
import com.fs.service.SelectService;
import com.fs.vo.ResponseData;
import com.fs.vo.ResultEnums;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author yyds
 * @fileName SelectServiceImpl
 * @date 2024/9/12 11:09
 * @description
 **/
@Service
public class SelectServiceImpl implements SelectService {
    @Resource
    private HtypesMapper htypesMapper;
    @Resource
    private StreetsMapper streetsMapper;
    @Resource
    private DistrictsMapper districtsMapper;
    @Override
    public ResponseData<List<Htypes>> AllHType() {
        return new ResponseData<>(ResultEnums.OK,htypesMapper.selectList(null));
    }

    @Override
    public ResponseData<List<Streets>> AllStreets() {
        return new ResponseData<>(ResultEnums.OK,streetsMapper.selectList(null));
    }

    @Override
    public ResponseData<List<Districts>> AllDistricts() {
        return new ResponseData<>(ResultEnums.OK,districtsMapper.selectList(null));
    }
}
